// pages/wh_mine/mine.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    setting: {
      nav_title: "我的",
      opacity: `background-color: rgba(255, 255, 255, 0);`,
    },
    mineHeight: 300,
    orderArr: [
      {imgUrl: "/images/me/dfk.png", text: "待付款"},
      {imgUrl: "/images/me/dsh.png", text: "待收货"},
      {imgUrl: "/images/me/pj.png", text: "评价"},
      {imgUrl: "/images/me/sh.png", text: "售后"}
    ],
    myFunc: [
      {imgUrl: "/images/me/jflc.png", text: "积分里程"},
      {imgUrl: "/images/me/scsp.png", text: "收藏商品"},
      {imgUrl: "/images/me/yhq.png", text: "优惠券"},
      {imgUrl: "/images/me/dzgl.png", text: "地址管理"},
      {imgUrl: "/images/me/lqzx.png", text: "领券中心"},
      {imgUrl: "/images/me/bzzx.png", text: "帮助中心"}
    ],
    TJArr: [
      {imgUrl: '/images/good1.png', text: '人工智能电视小米电视4C32英寸', price: '1888'},
      {imgUrl: '/images/good2.png', text: '人工智能电视小米电视4C32英寸', price: '1888'},
      {imgUrl: '/images/good3.png', text: '人工智能电视小米电视4C32英寸', price: '1888'}
    ],
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    let that = this
    wx.getSystemInfo({
      success (res) {
        let clientHeight = res.windowHeight;
        let clientWidth = res.windowWidth;
        let ratio = 750 / clientWidth;
        // 微信视口高度
        let rpxHeight = clientHeight * ratio
        that.setData({
          mineHeight: rpxHeight
        })
      }
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})